package aisLogic;

import java.util.Observable;

public class ModuleRef extends Observable
{
	public static final int DX = 0;
	public static final int DY = 1;
	public static final int MODULE = 2;
	
	private int dx = 0;
	private int dy = 0;
	private Module module = null;

	
	public ModuleRef()
	{
		super();
	}
	
	public ModuleRef(Module m, int dx, int dy)
	{
		super();
		this.module = m;
		this.dx = dx;
		this.dy = dy;
	}

	public Module getModule()
	{
		return this.module;
	}

	public void setModule(Module m)
	{
		this.module= m;
		this.setChanged();
		this.notifyObservers(new Integer(MODULE));
	}
	
	public int getDx()
	{
		return dx;
	}

	public void setDx(int dx)
	{
		this.dx = dx;
		this.setChanged();
		this.notifyObservers(new Integer(DX));
	}

	public int getDy()
	{
		return dy;
	}

	public void setDy(int dy)
	{
		this.dy = dy;
		this.setChanged();
		this.notifyObservers(new Integer(DY));
	}
	
}
